package kernel_db.db;

@SuppressWarnings("serial")
public class DB_Error extends Exception {
	private boolean errorType;
	
	public DB_Error() {
		super("No error message specified");
		errorType = true;
	}

	public DB_Error(String message) {
		super(message);
		errorType = true;
	}
	
	public DB_Error(String message, boolean errorType) {
		super(message);
		this.errorType = errorType;
	}
	
	public boolean getErrorType(){
		return errorType;
	}

	@Override
	public String getMessage() {
		return toString();
	}

	@Override
	public String toString() {
		return super.getMessage();
	}
	
}